<%= @exception.class.to_s =~ /^[aeiou]/i ? 'An' : 'A' %> <%= @exception.class %> occurred in <%= @kontroller.controller_name %>#<%= @kontroller.action_name %>:

<%= @exception.message %>
<%= @backtrace.first %>

h1. Request

* URL        : <%= @request.url %>
* HTTP Method: <%= @request.request_method %>
* IP address : <%= @request.remote_ip %>
* Parameters : <%= @request.filtered_parameters.inspect %>
* Timestamp  : <%= Time.current %>
* Server : <%= Socket.gethostname %>
<% if defined?(Rails) -%>
* Rails root : <%= Rails.root %>
<% end -%>
* Process: <%= $$ %>

h1. Session

* session id: <%= @request.ssl? ? "[FILTERED]" : (@request.session['session_id'] || (@request.env["rack.session.options"] && @request.env["rack.session.options"][:id])).inspect %>
* data: <%= PP.pp(@request.session.to_hash, "") %>

h1. Environment

<% filtered_env = @request.filtered_env -%>
<% max = filtered_env.keys.map(&:to_s).max { |a, b| a.length <=> b.length } -%>
<% filtered_env.keys.map(&:to_s).sort.each do |key| -%>
<% inspect_object = filtered_env[key].is_a?(Hash) || filtered_env[key].is_a?(Array) ? filtered_env[key].inspect : filtered_env[key].to_s -%>
* <%= "%-*s: %s" % [max.length, key, inspect_object] %>
<% end -%>

h1. Backtrace

<%= @backtrace.join("\n") %>
